# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Limao Luo <luolimao+AUR@gmail.com>

pkgname=nyancat
pkgver=1.5.2
pkgrel=2
pkgdesc="Nyancat rendered in your terminal."
arch=('loong64' 'x86_64')
url=https://nyancat.dakko.us/
license=('custom:NCSA')
depends=('glibc')
source=("$pkgname-$pkgver.tar.gz::https://github.com/klange/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('8eee5da8afacdbe8b6b5f66686c101d42da26ef6c172e6b43b6042e1bacf7dfb5668e006cbbe675aca523b567eea57404af5b5bb6d654d137951e06c9a75463a')

build() {
  make -C $pkgname-$pkgver
}

package() {
  cd $pkgname-$pkgver
  install -Dm755 src/$pkgname "$pkgdir"/usr/bin/$pkgname
  install -Dm644 $pkgname.1 "$pkgdir"/usr/share/man/man1/$pkgname.1

  install -d "$pkgdir/usr/lib/systemd/system"
  install -m644 systemd/* "$pkgdir/usr/lib/systemd/system"
}
